<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			var obj = {
				width:100,
				height:200,
				opacity:1,
				color:'red',
				border:'1px solid red'
			}
//		                                       对象  属性 
			function change(obj,attr){
				return obj[attr];
			}
			
			var w = change(obj,'width');
			console.log(w);
			var h = change(obj,'height');
			console.log(h);
			
		</script>
	</body>
</html>
